package cn.iocoder.yudao.module.wms.api.stock;

import cn.iocoder.yudao.module.wms.api.warehouse.StockApi;
import cn.iocoder.yudao.module.wms.controller.admin.stock.vo.StockSaveReqVO;
import cn.iocoder.yudao.module.wms.service.stock.StockService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: Ljx
 * @createTime: 2024年05月12日 14:56:45
 * @version: v1.0.0
 * @Description: 库存汇总API实现类
 */
@Service
public class StockApiImpl implements StockApi {

    @Resource
    private StockService stockService;

    @Override
    public void initStock(Long productId) {
        stockService.createStock(new StockSaveReqVO().setProductId(productId));
    }

    @Override
    public void deleteStockByProduct(Long productId) {
        stockService.deleteStockByProduct(productId);
    }
}
